package utils

import (
	"fmt"
	"runtime/debug"
)

func CapturePanic() (has bool) {
	if err := recover(); err != nil {
		fmt.Printf("runtime panic: %s\n", err)
		fmt.Printf("runtime stack: %s\n", debug.Stack()[:1024])
		return true
	}
	return false
}
